import { defineStore } from 'pinia'
import { store } from '@/store'

export const useActivityStore = defineStore('activityStore', {
  state: () => {
    return {
      collectCard: [
        { name: '卡片1', cardPic: '' },
        { name: '卡片2', cardPic: '' },
        { name: '卡片3', cardPic: '' },
        { name: '卡片4', cardPic: '' },
        { name: '卡片5', cardPic: '' },
        { name: '卡片6', cardPic: '' },
        { name: '卡片7', cardPic: '' },
        { name: '卡片8', cardPic: '' },
        { name: '卡片9', cardPic: '' },
        { name: '卡片10', cardPic: '' },
        { name: '卡片11', cardPic: '' },
        { name: '卡片12', cardPic: '' },
        { name: '卡片13', cardPic: '' },
        { name: '卡片14', cardPic: '' },
        { name: '卡片15', cardPic: '' },
        { name: '卡片16', cardPic: '' },
        { name: '卡片17', cardPic: '' },
        { name: '卡片18', cardPic: '' },
      ],
      treasureHunt: [
        { name: '勋章', cardPic: '' },
        { name: '打稻机', cardPic: '' },
        { name: '宝物3', cardPic: '' },
        { name: '宝物4', cardPic: '' },
        { name: '宝物5', cardPic: '' },
        { name: '宝物5', cardPic: '' },
        { name: '宝物6', cardPic: '' },
        { name: '宝物7', cardPic: '' },
        { name: '宝物8', cardPic: '' },
        { name: '宝物10', cardPic: '' },
        { name: '宝物11', cardPic: '' },
        { name: '宝物12', cardPic: '' },
        { name: '宝物13', cardPic: '' },
        { name: '宝物14', cardPic: '' },
      ],
    }
  },
  getters: {
    getColectCardList: (state) => {
      return state.collectCard
    },
    getTreasureHunt: (state) => {
      return state.treasureHunt
    },
  },
  actions: {
    // setColectCardList(value) {
    //   this.collectCard = value
    // },
    // setTreasureHunt(value) {
    //   this.treasureHunt = value
    // },
  },
})

export function useActivityStoreG() {
  return useActivityStore(store)
}
